﻿using System;
using System.CodeDom.Compiler;

namespace SWF
{
    public struct PrimitiveBoolean : IPrimitive
    {
        public PrimitiveType PrimitiveType { get { return PrimitiveType.Boolean; } }
        public object Value { get { return BooleanValue; } }
        public int Length { get { return 1 + 1; } }
        public bool BooleanValue;

        public PrimitiveBoolean(SwfReader r)
        {
            BooleanValue = r.GetByte() > 0 ? true : false; // stored as byte
        }
    }
}
